Skip to content

Parse GuildQuestRewardFactor#58

Merged
AngeloTadeucci merged 1 commit intoMS2Community:masterfrom
Zintixx:guildquesttable
Mar 23, 2026
Merged

Parse GuildQuestRewardFactor#58
AngeloTadeucci merged 1 commit intoMS2Community:masterfrom
Zintixx:guildquesttable

Conversation

@Zintixx
Copy link

@Zintixx Zintixx commented Mar 23, 2026

Summary by CodeRabbit

  • New Features

    • Added support for parsing guild quest reward factor data from configuration files, enabling proper handling of guild experience, user experience, guild funds, user meso, and guild coin factors.
  • Chores

    • Updated package version to 2.4.1.

@coderabbitai
Copy link

coderabbitai bot commented Mar 23, 2026

📝 Walkthrough

Walkthrough

This PR introduces parsing support for a new XML table (guildquestrewardfactor.xml) by adding a serializer and public parse method to TableParser, defining corresponding XML model classes, and including test coverage. The package version is incremented to 2.4.1.

Changes

Cohort / File(s) Summary
Version Update
Maple2.File.Parser/Maple2.File.Parser.csproj
Bumped PackageVersion from 2.4.0 to 2.4.1.
Parser Enhancement
Maple2.File.Parser/TableParser.cs
Added guildQuestRewardFactorSerializer field and new public method ParseGuildQuestRewardFactor() that loads and deserializes the guild quest reward factor XML table, yielding (level, factor) tuples.
XML Table Model
Maple2.File.Parser/Xml/Table/GuildQuestRewardFactor.cs
Introduced GuildQuestRewardFactorRoot and GuildQuestRewardFactor classes to model the XML structure, with attributes for level and various reward factors (experience, funds, meso, guild coin).
Test Coverage
Maple2.File.Tests/TableParserTest.cs
Added TestGuildQuestRewardFactor() test method that iterates through parsed guild quest reward factors.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • Parse Ugc Housing Point Reward #44: Parallel changes adding a new XML serializer, Parse...() method in TableParser, XML model classes, and corresponding tests following the same implementation pattern.

Suggested reviewers

  • AngeloTadeucci

Poem

🐰 A leap of joy! New guild quests now shine,
With reward factors parsed, level by line,
Serializers dance, XML takes flight,
Tests hop along—everything feels just right! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title directly and accurately describes the main change: adding parsing functionality for GuildQuestRewardFactor data, which is evident from the new parser method, XML model classes, and test additions.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Maple2.File.Parser/Xml/Table/GuildQuestRewardFactor.cs`:
- Line 18: The XmlAttribute field GuildCoinFactor in class
GuildQuestRewardFactor uses PascalCase which won't match the existing camelCase
XML attribute "guildCoinFactor" and causes silent deserialization to leave the
value at 0; fix it by either renaming the field to guildCoinFactor to match the
rest of the attributes (guildExpFactor, userExpFactor, guildFundFactor,
userMesoFactor) or add an explicit mapping with [XmlAttribute(AttributeName =
"guildCoinFactor")] on GuildCoinFactor so the XML deserializer binds correctly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0983a6b1-5365-4bc6-a13d-cb05dd2bde22

📥 Commits

Reviewing files that changed from the base of the PR and between 08f0515 and 2af5e98.

📒 Files selected for processing (4)
  • Maple2.File.Parser/Maple2.File.Parser.csproj
  • Maple2.File.Parser/TableParser.cs
  • Maple2.File.Parser/Xml/Table/GuildQuestRewardFactor.cs
  • Maple2.File.Tests/TableParserTest.cs

@AngeloTadeucci AngeloTadeucci merged commit 042a4a7 into MS2Community:master Mar 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants